﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using WinLiga;

namespace WinLiga
{
    public partial class Jugadores : PhoneApplicationPage
    {
        List<Jugador> listaJugadores;
        public Jugadores()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            //aquí se llamaría al metodo de búsqueda
            listaJugadores = new List<Jugador>();
            List<Competicion> aux=new List<Competicion>();
            listaJugadores.Add(new Jugador("CR7",27,1.87,80.5,"Madeira","Portugues","Delantero",42,57,aux,7,"Real Madrid"));
            listBox1.ItemsSource = listaJugadores;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            if (!String.IsNullOrWhiteSpace("/Interfaz/Inicio.xaml"))
            {
                this.NavigationService.GoBack();
            }
        }
        private void Jugadores_Click(object sender, RoutedEventArgs e)
        {
            string ID="1";
            this.NavigationService.Navigate(new Uri("/Interfaz/pJug.xaml?ID="+ID, UriKind.Relative));          
        }
    }
}